﻿namespace Cpuss
{
    /// <summary>
    /// Data associated with <see cref="Runner.Completed"/>.
    /// </summary>
    public sealed class RunnerCompletedEventArgs : RunnerStartedEventArgs
    {
        private readonly int _totalTime;

        /// <summary>
        /// Initializes a new instance of <see cref="RunnerCompletedEventArgs"/>.
        /// </summary>
        /// <param name="processCount">Number of processes in simulation.</param>
        /// <param name="strategy">Strategy being used in simulation.</param>
        /// <param name="totalTime">Total time of simulation.</param>
        public RunnerCompletedEventArgs(int processCount, IStrategy strategy, int totalTime)
            : base(processCount, strategy)
        {
            _totalTime = totalTime;
        }

        /// <summary>
        /// Gets the total time of simulation.
        /// </summary>
        public int TotalTime
        {
            get { return _totalTime; }
        }
    }
}